Data is generally retrieved from a database using queries composed of expressions that are written in a language that declaratively specifies what is to be retrieved. Such expressions are typically processed by a query processor, which is used to determine the query's execution plan, that is, the sequence of steps that will be taken to retrieve the requested data. Within this data retrieval framework, query operators may be utilized to map to lower-level language constructs and/or expression trees, making the process of data retrieval more efficient.
It is desirable to provide techniques to provide mechanisms by which shared expressions amongst expression trees may be utilized to minimize the costs associated with processing a large number of queries that contain the same semantics within their data structures. It is with respect to this general technical environment that aspects of the present technology disclosed herein have been contemplated. Furthermore, although a general environment and relatively specific problems have been discussed, it should be understood that the examples described herein should not be limited to the general environment or to solving the specific problems identified in the background.